package com.trace.basic;

/**
 * Created by denglw on 2020/1/7.<br/>
 * Desc: 线程基本属性
 */
@SuppressWarnings("InstantiatingAThreadWithDefaultRunMethod")
public class ThreadAttr {

    public static void main(String[] args) {
        long id = Thread.currentThread().getId();
        System.out.println(id);
        System.out.println(Thread.currentThread().getName());
        System.out.println(new Thread().getName());

        ThreadGroup group = new ThreadGroup("");
        System.out.println(new Thread("thr1").getId());
        System.out.println(new Thread("thr2").getId());
    }
}
